<template>
  <view
    class="c-crossed-price"
    :class="ggclass"
    :style="{ fontSize: $rpxunit(size), 'font-weight': bold ? 'bold' : '' }"
  >
    <slot>{{ value }}</slot>
  </view>
</template>

<script setup lang="ts">
import { defineProps, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance() as any;
const props = defineProps({
  value: {
    type: [String, Number],
    default: "",
  },
  color: {
    type: String,
    default: "",
  },
  size: {
    type: [String, Number],
    default: "",
  },
  bold: {
    type: Boolean,
    default: false,
  },
  ggclass: {
    type: [String, Array],
    default: () => [],
  },
});
let $rpxunit = proxy.$rpxunit;
</script>

<style lang="scss" scoped>
.c-crossed-price {
  display: inline-flex;
  text-decoration: line-through;
  color: #999999;
}
</style>